Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DROOLS-7488] tests - update rule action method in DRL #5381

Merged
merged 3 commits into from
Jul 12, 2023

Conversation

nprentza
Copy link
Contributor

JIRA: DROOLS-7488

Copy link
Contributor

@tkobayas tkobayas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good coverage.

@mariofusco mariofusco changed the title D7488, tests - update rule action method in DRL [DROOLS-7488] tests - update rule action method in DRL Jul 10, 2023
clearResults(session2);

Optional<FactHandle> getFactHandleForPerson = getFactHandle(session2, pEleven);
if (!getFactHandleForPerson.isEmpty()){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not missing anything we always expect this Optional not to be empty, right? In case this is the expectation, the test should reflect it and fail with an empty Optional instead of simply silencing the problem as it does now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we expect that the Optional FactHandle will not be empty. Thanks for the suggestion, I will replace if-statement with an assertion so that the test will fail if the FactHandle is empty.

Copy link
Contributor

@mariofusco mariofusco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job, please only review my comment and change the test accordingly in case I'm right.

@nprentza
Copy link
Contributor Author

Good job, please only review my comment and change the test accordingly in case I'm right.

Thanks Mario, I changed the test and updated the PR.

@sonarcloud
Copy link

sonarcloud bot commented Jul 11, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mariofusco mariofusco merged commit df0acd8 into apache:main Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants